<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'announcements-form',
	'enableAjaxValidation'=>false,
	'htmlOptions' => array(
		'enctype' => 'multipart/form-data'
	)
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>200)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>
    <div class="row">
		<?php echo $form->labelEx($model,'start_date'); ?>
		<?php echo CHtml::activeTextField($model,'start_date',array("id"=>"start_date")); ?>
        <?php echo CHtml::image(Yii::app()->baseUrl."/images/images.jpg","calendar",
				array("id"=>"c_button","class"=>"pointer")); ?>
					&nbsp;(calendar appears when image is clicked)
					<?php $this->widget('ext.calendar.SCalendar',
						array(
						'inputField'=>'start_date',
						'button'=>'c_button',
						'ifFormat'=>'%Y-%m-%d',
					));
					?>
		<?php echo $form->error($model,'start_date'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'end_date'); ?>
		<?php echo CHtml::activeTextField($model,'end_date',array("id"=>"end_date")); ?>
        <?php echo CHtml::image(Yii::app()->baseUrl."/images/images.jpg","calendar",
				array("id"=>"c_button2","class"=>"pointer")); ?>
					&nbsp;(calendar appears when image is clicked)
					<?php $this->widget('ext.calendar.SCalendar',
						array(
						'inputField'=>'end_date',
						'button'=>'c_button2',
						'ifFormat'=>'%Y-%m-%d',
					));
					?>
		<?php echo $form->error($model,'end_date'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'status'); ?>
		<?php echo $form->checkbox($model,'status'); ?>
		<?php echo $form->error($model,'status'); ?>
	</div>


	<div class="row">
		<?php echo $form->labelEx($model,'content'); ?>
        <?php 
		//echo $form->textArea($model,'description',array('rows'=>6, 'cols'=>50));
		$this->widget('ext.ckeditor.CKEditorWidget',array(
			"model"=>$model,
			"attribute"=>'content',
			"config" => array(
				"height"=>"250px",
				"width"=>"700px",
				"toolbar"=>Yii::app()->params['ckeditor']
			)
		));  
		?>
		<?php echo $form->error($model,'content'); ?>
	</div>


	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->